package me.itsoo.artemis.framework.ioc.factory;

import me.itsoo.artemis.framework.ioc.exception.NoSuchBeanException;

/**
 * BeanFactory
 *
 * @author zxy
 * @version 0.0.1
 * @since 2023/6/2
 */
public interface BeanFactory {

    /**
     * 获取对象
     *
     * @param beanName String
     * @return Object
     * @throws NoSuchBeanException NoSuchBeanException
     */
    Object getBean(String beanName) throws NoSuchBeanException;

    /**
     * 获取对象
     *
     * @param beanClass Class
     * @param <T>       T
     * @return T
     * @throws NoSuchBeanException NoSuchBeanException
     */
    <T> T getBean(Class<T> beanClass) throws NoSuchBeanException;

}
